import request from '@/utils/request'

// 获取企业认证列表
export function getEnterpriseCertificationList(params) {
  return request({
    url: '/api/api/v1/admin/enterprise-certification/list',
    method: 'get',
    params
  })
}

// 获取企业认证详情
export function getEnterpriseCertificationDetail(enterpriseId) {
  return request({
    url: `/api/api/v1/admin/enterprise-certification/detail/${enterpriseId}`,
    method: 'get'
  })
}

// 审核通过企业认证
export function approveEnterpriseCertification(enterpriseId) {
  return request({
    url: `/api/api/v1/admin/enterprise-certification/approve/${enterpriseId}`,
    method: 'post'
  })
}

// 驳回企业认证
export function rejectEnterpriseCertification(enterpriseId, rejectionReason) {
  return request({
    url: `/api/api/v1/admin/enterprise-certification/reject/${enterpriseId}`,
    method: 'post',
    data: {
      rejection_reason: rejectionReason
    }
  })
}

// 根据状态获取企业认证列表
export function getEnterpriseCertificationListByStatus(status, params) {
  return request({
    url: `/api/api/v1/admin/enterprise-certification/list/status/${status}`,
    method: 'get',
    params
  })
} 